package com.project.base.hdfs;

import com.project.base.common.Constants;
import com.project.base.core.hdfs.HdfsHelper;
import com.project.base.core.tables.RequestSpecialParam;
import org.apache.hadoop.fs.FSDataOutputStream;

import java.io.IOException;


public class RequestSpecialParamHdfsHelper extends HdfsHelper {

    private static final long serialVersionUID = -7096140395431658987L;

    public static final String TABLE_NAME = "REQUEST_SPECIAL_PARAM";

    @Override
    public void save(FSDataOutputStream outputStream, Object obj) {
        if (!(obj instanceof RequestSpecialParam)) {
            return;
        }
        RequestSpecialParam entity = (RequestSpecialParam) obj;
        String entityStr = entity.toLogStr(Constants.SEPERATOR);
        try {
            outputStream.writeUTF(entityStr);
            outputStream.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    protected String getTableName() {
        // TODO Auto-generated method stub
        return null;
    }

}
